export const unifiedPurchaseColumns = [
  {
    title: 'SKU编码',
    key: 'skuNo',
    width: 100,
    fixed: 'left',
    sortable: true
  },
  {
    title: '商品名称',
    key: 'productName',
    width: 100,
    fixed: 'left',
    sortable: true,
  },
  {
    title: '规格',
    key: 'specDetailStr',
    width: 80,
    fixed: 'left',
    sortable: true,
  },
  {
    title: '主计量单位',
    key: 'unitName',
    width: '90',
    render: (h, { row }) => {
      return (<span>{ row.supplyProductInfo ? row.supplyProductInfo.unitName : '' }</span>)
    }
  },
  {
    title: '进价类型',
    children: [
      {
        title: '原进价类型',
        key: 'purchasePriceTypeStr',
        width: 100
      },
      {
        title: '现进价类型',
        slot: 'purchasePriceTypeUpdate',
        width: 100,
        render: (h, { row }) => {
          return (<span>{ row.purchasePriceTypeUpdate === '1' ? '统一进价' : '区域进价' }</span>)
        }
      }
    ]
  },
  {
    title: '销售区域',
    key: 'saleAreaShortNames',
    width: 150,
    sortable: true,
  },
  {
    title: '主计量进价',
    width: 150,
    children: [
      {
        title: '原进价',
        key: 'mainPurchasePrice',
        width: 100
      },
      {
        title: '现进价',
        key: 'mainPurchasePriceUpdate',
        width: 160,
        type: 'inputNumChange',
        precision: 3
      }
    ]
  },
  {
    title: '进价浮动比率',
    key: 'mainPurchasePriceFloatRadio',
    width: 120,
    sortable: true
  },
  {
    title: '厂家面价',
    children: [
      {
        title: '原值',
        width: 100,
        key: 'factoryFacePrice'
      },
      {
        title: '现值',
        width: 160,
        key: 'factoryFacePriceUpdate',
        type: 'inputNumChange'
      }
    ]
  },
  {
    title: '进价备注',
    children: [
      {
        title: '原值',
        width: 100,
        key: 'purchasePriceNote'
      },
      {
        title: '现值',
        key: 'purchasePriceNoteUpdate',
        width: 200,
        type: 'inputNoLimit',
        maxlength: 200
      }
    ]
  },
  {
    title: '加价类型',
    key: 'addPriceTypeStr',
    width: 100,
  },
  {
    title: '运费比例或金额',
    children: [
      {
        title: '原值',
        key: 'freightRatio',
        width: 100
      },
      {
        title: '现值',
        key: 'freightRatioUpdate',
        width: 160,
        type: 'inputNumChange',
        precision: 3
      }
    ]
  },
  {
    title: '包装比例或金额',
    children: [
      {
        title: '原值',
        key: 'packRatio',
        width: 100
      },
      {
        title: '现值',
        key: 'packRatioUpdate',
        width: 160,
        type: 'inputNumChange',
        precision: 3
      }
    ]
  },
  {
    title: '加工费比例或金额',
    children: [
      {
        title: '原值',
        key: 'processChargesRatio',
        width: 100
      },
      {
        title: '现值',
        key: 'processChargesRatioUpdate',
        width: 160,
        type: 'inputNumChange',
        precision: 3
      }
    ]
  },
  {
    title: '返利折合比例或金额',
    children: [
      {
        title: '原值',
        key: 'rebateRatio',
        width: 100
      },
      {
        title: '现值',
        key: 'rebateRatioUpdate',
        width: 160,
        type: 'inputNumChange',
        precision: 3
      }
    ]
  },
  {
    title: '返利说明',
    width: 180,
    children: [
      {
        title: '原值',
        key: 'rebateRatioDesc',
        width: 100
      },
      {
        title: '现值',
        key: 'rebateRatioDescUpdate',
        width: 160,
        type: 'inputNoLimit',
        maxlength: 300
      }
    ]
  },
  {
    title: '成本价',
    children: [
      {
        title: '原值',
        key: 'mainUnitCostPrice',
        width: 100
      },
      {
        title: '现值',
        key: 'mainUnitCostPriceUpdate',
        width: 150,
      }
    ]
  },
  {
    title: '成本价浮动比率',
    key: 'mainUnitCostFloatPrice',
    width: 130,
    sortable: true
  },
  {
    title: '厂家代码',
    key: 'factoryCode',
    width: 150
  },
  {
    title: '厂家调价原因',
    key: 'changePriceReason',
    width: 200,
    type: 'inputNoLimit',
    maxlength: 200
  },
  {
    title: '发票类型',
    key: 'invoiceTypeName'
  },
  {
    title: '税率',
    key: 'taxRate'
  }
]
